package org.su.webadapter.bind;


import org.su.generalmvc.IEditor;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.lang.reflect.Method;


/**
 * 原子类型数组编辑器，将字符串数组装换为对应的原子类型数组
 * @author yangchuan 上午9:05:32
 *
 */
public abstract class ArrayAtomicEditor  implements IEditor {


	@Override
	public Object getParamValue(String paramName, Class<?> paramType, int paramIndex, Method writer, ServletRequest request,
								ServletResponse response) {
				return parseText(request.getParameterValues(paramName));
			}


	public abstract Object parseText(String[] text);

}